3.4.53 \(\int \frac {\tan ^4(e+f x)}{(a+b \tan ^2(e+f x))^{5/2}} \, dx\) [353]

Optimal. Leaf size=131 \[ \frac {\text {ArcTan}\left (\frac {\sqrt {a-b} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{(a-b)^{5/2} f}-\frac {a \tan (e+f x)}{3 (a-b) b f \left (a+b \tan ^2(e+f x)\right )^{3/2}}+\frac {(a-4 b) \tan (e+f x)}{3 (a-b)^2 b f \sqrt {a+b \tan ^2(e+f x)}} \]

[Out]

arctan((a-b)^(1/2)*tan(f*x+e)/(a+b*tan(f*x+e)^2)^(1/2))/(a-b)^(5/2)/f+1/3*(a-4*b)*tan(f*x+e)/(a-b)^2/b/f/(a+b*
tan(f*x+e)^2)^(1/2)-1/3*a*tan(f*x+e)/(a-b)/b/f/(a+b*tan(f*x+e)^2)^(3/2)

________________________________________________________________________________________

Rubi [A]
time = 0.10, antiderivative size = 131, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {3751, 481, 541, 12, 385, 209} \begin {gather*} \frac {\text {ArcTan}\left (\frac {\sqrt {a-b} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{f (a-b)^{5/2}}+\frac {(a-4 b) \tan (e+f x)}{3 b f (a-b)^2 \sqrt {a+b \tan ^2(e+f x)}}-\frac {a \tan (e+f x)}{3 b f (a-b) \left (a+b \tan ^2(e+f x)\right )^{3/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Tan[e + f*x]^4/(a + b*Tan[e + f*x]^2)^(5/2),x]

[Out]

ArcTan[(Sqrt[a - b]*Tan[e + f*x])/Sqrt[a + b*Tan[e + f*x]^2]]/((a - b)^(5/2)*f) - (a*Tan[e + f*x])/(3*(a - b)*
b*f*(a + b*Tan[e + f*x]^2)^(3/2)) + ((a - 4*b)*Tan[e + f*x])/(3*(a - b)^2*b*f*Sqrt[a + b*Tan[e + f*x]^2])

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 385

Int[((a_) + (b_.)*(x_)^(n_))^(p_)/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Subst[Int[1/(c - (b*c - a*d)*x^n), x]
, x, x/(a + b*x^n)^(1/n)] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && EqQ[n*p + 1, 0] && IntegerQ[n]

Rule 481

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(-a)*e^(
2*n - 1)*(e*x)^(m - 2*n + 1)*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(b*n*(b*c - a*d)*(p + 1))), x] + Dist[e^
(2*n)/(b*n*(b*c - a*d)*(p + 1)), Int[(e*x)^(m - 2*n)*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[a*c*(m - 2*n + 1)
+ (a*d*(m - n + n*q + 1) + b*c*n*(p + 1))*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, q}, x] && NeQ[b*c - a*d, 0]
 && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m - n + 1, n] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]

Rule 541

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)), x_Symbol] :> Simp[(
-(b*e - a*f))*x*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(a*n*(b*c - a*d)*(p + 1))), x] + Dist[1/(a*n*(b*c - a
*d)*(p + 1)), Int[(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(b*e - a*f) + e*n*(b*c - a*d)*(p + 1) + d*(b*e - a*
f)*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, n, q}, x] && LtQ[p, -1]

Rule 3751

Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol]
 :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[c*(ff/f), Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2
 + ff^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ
[n, 2] || EqQ[n, 4] || (IntegerQ[p] && RationalQ[n]))

Rubi steps

\begin {align*} \int \frac {\tan ^4(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{5/2}} \, dx &=\frac {\text {Subst}\left (\int \frac {x^4}{\left (1+x^2\right ) \left (a+b x^2\right )^{5/2}} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {a \tan (e+f x)}{3 (a-b) b f \left (a+b \tan ^2(e+f x)\right )^{3/2}}+\frac {\text {Subst}\left (\int \frac {a+(a-3 b) x^2}{\left (1+x^2\right ) \left (a+b x^2\right )^{3/2}} \, dx,x,\tan (e+f x)\right )}{3 (a-b) b f}\\ &=-\frac {a \tan (e+f x)}{3 (a-b) b f \left (a+b \tan ^2(e+f x)\right )^{3/2}}+\frac {(a-4 b) \tan (e+f x)}{3 (a-b)^2 b f \sqrt {a+b \tan ^2(e+f x)}}+\frac {\text {Subst}\left (\int \frac {3 a b}{\left (1+x^2\right ) \sqrt {a+b x^2}} \, dx,x,\tan (e+f x)\right )}{3 a (a-b)^2 b f}\\ &=-\frac {a \tan (e+f x)}{3 (a-b) b f \left (a+b \tan ^2(e+f x)\right )^{3/2}}+\frac {(a-4 b) \tan (e+f x)}{3 (a-b)^2 b f \sqrt {a+b \tan ^2(e+f x)}}+\frac {\text {Subst}\left (\int \frac {1}{\left (1+x^2\right ) \sqrt {a+b x^2}} \, dx,x,\tan (e+f x)\right )}{(a-b)^2 f}\\ &=-\frac {a \tan (e+f x)}{3 (a-b) b f \left (a+b \tan ^2(e+f x)\right )^{3/2}}+\frac {(a-4 b) \tan (e+f x)}{3 (a-b)^2 b f \sqrt {a+b \tan ^2(e+f x)}}+\frac {\text {Subst}\left (\int \frac {1}{1-(-a+b) x^2} \, dx,x,\frac {\tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{(a-b)^2 f}\\ &=\frac {\tan ^{-1}\left (\frac {\sqrt {a-b} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{(a-b)^{5/2} f}-\frac {a \tan (e+f x)}{3 (a-b) b f \left (a+b \tan ^2(e+f x)\right )^{3/2}}+\frac {(a-4 b) \tan (e+f x)}{3 (a-b)^2 b f \sqrt {a+b \tan ^2(e+f x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 6.04, size = 260, normalized size = 1.98 \begin {gather*} \frac {\tan ^5(e+f x) \left (1+\frac {b \tan ^2(e+f x)}{a}\right ) \left (\frac {\tanh ^{-1}\left (\frac {\sqrt {-\tan ^2(e+f x)+\frac {b \tan ^2(e+f x)}{a}}}{\sqrt {1+\frac {b \tan ^2(e+f x)}{a}}}\right ) \sqrt {-\tan ^2(e+f x)+\frac {b \tan ^2(e+f x)}{a}}}{\sqrt {1+\frac {b \tan ^2(e+f x)}{a}}}-\frac {-\tan ^2(e+f x)+\frac {b \tan ^2(e+f x)}{a}}{1+\frac {b \tan ^2(e+f x)}{a}}-\frac {\left (-\tan ^2(e+f x)+\frac {b \tan ^2(e+f x)}{a}\right )^2}{3 \left (1+\frac {b \tan ^2(e+f x)}{a}\right )^2}\right )}{a^2 f \sqrt {a+b \tan ^2(e+f x)} \left (-\tan ^2(e+f x)+\frac {b \tan ^2(e+f x)}{a}\right )^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Tan[e + f*x]^4/(a + b*Tan[e + f*x]^2)^(5/2),x]

[Out]

(Tan[e + f*x]^5*(1 + (b*Tan[e + f*x]^2)/a)*((ArcTanh[Sqrt[-Tan[e + f*x]^2 + (b*Tan[e + f*x]^2)/a]/Sqrt[1 + (b*
Tan[e + f*x]^2)/a]]*Sqrt[-Tan[e + f*x]^2 + (b*Tan[e + f*x]^2)/a])/Sqrt[1 + (b*Tan[e + f*x]^2)/a] - (-Tan[e + f
*x]^2 + (b*Tan[e + f*x]^2)/a)/(1 + (b*Tan[e + f*x]^2)/a) - (-Tan[e + f*x]^2 + (b*Tan[e + f*x]^2)/a)^2/(3*(1 +
(b*Tan[e + f*x]^2)/a)^2)))/(a^2*f*Sqrt[a + b*Tan[e + f*x]^2]*(-Tan[e + f*x]^2 + (b*Tan[e + f*x]^2)/a)^3)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(294\) vs. \(2(117)=234\).
time = 0.10, size = 295, normalized size = 2.25

method result size
derivativedivides \(\frac {-\frac {\tan \left (f x +e \right )}{2 b \left (a +b \left (\tan ^{2}\left (f x +e \right )\right )\right )^{\frac {3}{2}}}+\frac {a \left (\frac {\tan \left (f x +e \right )}{3 a \left (a +b \left (\tan ^{2}\left (f x +e \right )\right )\right )^{\frac {3}{2}}}+\frac {2 \tan \left (f x +e \right )}{3 a^{2} \sqrt {a +b \left (\tan ^{2}\left (f x +e \right )\right )}}\right )}{2 b}-\frac {\tan \left (f x +e \right )}{3 a \left (a +b \left (\tan ^{2}\left (f x +e \right )\right )\right )^{\frac {3}{2}}}-\frac {2 \tan \left (f x +e \right )}{3 a^{2} \sqrt {a +b \left (\tan ^{2}\left (f x +e \right )\right )}}-\frac {b \left (\frac {\tan \left (f x +e \right )}{3 a \left (a +b \left (\tan ^{2}\left (f x +e \right )\right )\right )^{\frac {3}{2}}}+\frac {2 \tan \left (f x +e \right )}{3 a^{2} \sqrt {a +b \left (\tan ^{2}\left (f x +e \right )\right )}}\right )}{a -b}-\frac {b \tan \left (f x +e \right )}{\left (a -b \right )^{2} a \sqrt {a +b \left (\tan ^{2}\left (f x +e \right )\right )}}+\frac {\sqrt {b^{4} \left (a -b \right )}\, \arctan \left (\frac {b^{2} \left (a -b \right ) \tan \left (f x +e \right )}{\sqrt {b^{4} \left (a -b \right )}\, \sqrt {a +b \left (\tan ^{2}\left (f x +e \right )\right )}}\right )}{\left (a -b \right )^{3} b^{2}}}{f}\) \(295\)
default \(\frac {-\frac {\tan \left (f x +e \right )}{2 b \left (a +b \left (\tan ^{2}\left (f x +e \right )\right )\right )^{\frac {3}{2}}}+\frac {a \left (\frac {\tan \left (f x +e \right )}{3 a \left (a +b \left (\tan ^{2}\left (f x +e \right )\right )\right )^{\frac {3}{2}}}+\frac {2 \tan \left (f x +e \right )}{3 a^{2} \sqrt {a +b \left (\tan ^{2}\left (f x +e \right )\right )}}\right )}{2 b}-\frac {\tan \left (f x +e \right )}{3 a \left (a +b \left (\tan ^{2}\left (f x +e \right )\right )\right )^{\frac {3}{2}}}-\frac {2 \tan \left (f x +e \right )}{3 a^{2} \sqrt {a +b \left (\tan ^{2}\left (f x +e \right )\right )}}-\frac {b \left (\frac {\tan \left (f x +e \right )}{3 a \left (a +b \left (\tan ^{2}\left (f x +e \right )\right )\right )^{\frac {3}{2}}}+\frac {2 \tan \left (f x +e \right )}{3 a^{2} \sqrt {a +b \left (\tan ^{2}\left (f x +e \right )\right )}}\right )}{a -b}-\frac {b \tan \left (f x +e \right )}{\left (a -b \right )^{2} a \sqrt {a +b \left (\tan ^{2}\left (f x +e \right )\right )}}+\frac {\sqrt {b^{4} \left (a -b \right )}\, \arctan \left (\frac {b^{2} \left (a -b \right ) \tan \left (f x +e \right )}{\sqrt {b^{4} \left (a -b \right )}\, \sqrt {a +b \left (\tan ^{2}\left (f x +e \right )\right )}}\right )}{\left (a -b \right )^{3} b^{2}}}{f}\) \(295\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(f*x+e)^4/(a+b*tan(f*x+e)^2)^(5/2),x,method=_RETURNVERBOSE)

[Out]

1/f*(-1/2*tan(f*x+e)/b/(a+b*tan(f*x+e)^2)^(3/2)+1/2*a/b*(1/3*tan(f*x+e)/a/(a+b*tan(f*x+e)^2)^(3/2)+2/3/a^2*tan
(f*x+e)/(a+b*tan(f*x+e)^2)^(1/2))-1/3*tan(f*x+e)/a/(a+b*tan(f*x+e)^2)^(3/2)-2/3/a^2*tan(f*x+e)/(a+b*tan(f*x+e)
^2)^(1/2)-1/(a-b)*b*(1/3*tan(f*x+e)/a/(a+b*tan(f*x+e)^2)^(3/2)+2/3/a^2*tan(f*x+e)/(a+b*tan(f*x+e)^2)^(1/2))-1/
(a-b)^2*b*tan(f*x+e)/a/(a+b*tan(f*x+e)^2)^(1/2)+1/(a-b)^3*(b^4*(a-b))^(1/2)/b^2*arctan(b^2*(a-b)/(b^4*(a-b))^(
1/2)/(a+b*tan(f*x+e)^2)^(1/2)*tan(f*x+e)))

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^4/(a+b*tan(f*x+e)^2)^(5/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(b-a>0)', see `assume?` for mor
e details)Is

________________________________________________________________________________________

Fricas [A]
time = 1.60, size = 518, normalized size = 3.95 \begin {gather*} \left [-\frac {3 \, {\left (b^{2} \tan \left (f x + e\right )^{4} + 2 \, a b \tan \left (f x + e\right )^{2} + a^{2}\right )} \sqrt {-a + b} \log \left (-\frac {{\left (a - 2 \, b\right )} \tan \left (f x + e\right )^{2} - 2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {-a + b} \tan \left (f x + e\right ) - a}{\tan \left (f x + e\right )^{2} + 1}\right ) - 2 \, {\left ({\left (a^{2} - 5 \, a b + 4 \, b^{2}\right )} \tan \left (f x + e\right )^{3} - 3 \, {\left (a^{2} - a b\right )} \tan \left (f x + e\right )\right )} \sqrt {b \tan \left (f x + e\right )^{2} + a}}{6 \, {\left ({\left (a^{3} b^{2} - 3 \, a^{2} b^{3} + 3 \, a b^{4} - b^{5}\right )} f \tan \left (f x + e\right )^{4} + 2 \, {\left (a^{4} b - 3 \, a^{3} b^{2} + 3 \, a^{2} b^{3} - a b^{4}\right )} f \tan \left (f x + e\right )^{2} + {\left (a^{5} - 3 \, a^{4} b + 3 \, a^{3} b^{2} - a^{2} b^{3}\right )} f\right )}}, \frac {3 \, {\left (b^{2} \tan \left (f x + e\right )^{4} + 2 \, a b \tan \left (f x + e\right )^{2} + a^{2}\right )} \sqrt {a - b} \arctan \left (-\frac {\sqrt {b \tan \left (f x + e\right )^{2} + a}}{\sqrt {a - b} \tan \left (f x + e\right )}\right ) + {\left ({\left (a^{2} - 5 \, a b + 4 \, b^{2}\right )} \tan \left (f x + e\right )^{3} - 3 \, {\left (a^{2} - a b\right )} \tan \left (f x + e\right )\right )} \sqrt {b \tan \left (f x + e\right )^{2} + a}}{3 \, {\left ({\left (a^{3} b^{2} - 3 \, a^{2} b^{3} + 3 \, a b^{4} - b^{5}\right )} f \tan \left (f x + e\right )^{4} + 2 \, {\left (a^{4} b - 3 \, a^{3} b^{2} + 3 \, a^{2} b^{3} - a b^{4}\right )} f \tan \left (f x + e\right )^{2} + {\left (a^{5} - 3 \, a^{4} b + 3 \, a^{3} b^{2} - a^{2} b^{3}\right )} f\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^4/(a+b*tan(f*x+e)^2)^(5/2),x, algorithm="fricas")

[Out]

[-1/6*(3*(b^2*tan(f*x + e)^4 + 2*a*b*tan(f*x + e)^2 + a^2)*sqrt(-a + b)*log(-((a - 2*b)*tan(f*x + e)^2 - 2*sqr
t(b*tan(f*x + e)^2 + a)*sqrt(-a + b)*tan(f*x + e) - a)/(tan(f*x + e)^2 + 1)) - 2*((a^2 - 5*a*b + 4*b^2)*tan(f*
x + e)^3 - 3*(a^2 - a*b)*tan(f*x + e))*sqrt(b*tan(f*x + e)^2 + a))/((a^3*b^2 - 3*a^2*b^3 + 3*a*b^4 - b^5)*f*ta
n(f*x + e)^4 + 2*(a^4*b - 3*a^3*b^2 + 3*a^2*b^3 - a*b^4)*f*tan(f*x + e)^2 + (a^5 - 3*a^4*b + 3*a^3*b^2 - a^2*b
^3)*f), 1/3*(3*(b^2*tan(f*x + e)^4 + 2*a*b*tan(f*x + e)^2 + a^2)*sqrt(a - b)*arctan(-sqrt(b*tan(f*x + e)^2 + a
)/(sqrt(a - b)*tan(f*x + e))) + ((a^2 - 5*a*b + 4*b^2)*tan(f*x + e)^3 - 3*(a^2 - a*b)*tan(f*x + e))*sqrt(b*tan
(f*x + e)^2 + a))/((a^3*b^2 - 3*a^2*b^3 + 3*a*b^4 - b^5)*f*tan(f*x + e)^4 + 2*(a^4*b - 3*a^3*b^2 + 3*a^2*b^3 -
 a*b^4)*f*tan(f*x + e)^2 + (a^5 - 3*a^4*b + 3*a^3*b^2 - a^2*b^3)*f)]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\tan ^{4}{\left (e + f x \right )}}{\left (a + b \tan ^{2}{\left (e + f x \right )}\right )^{\frac {5}{2}}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)**4/(a+b*tan(f*x+e)**2)**(5/2),x)

[Out]

Integral(tan(e + f*x)**4/(a + b*tan(e + f*x)**2)**(5/2), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^4/(a+b*tan(f*x+e)^2)^(5/2),x, algorithm="giac")

[Out]

integrate(tan(f*x + e)^4/(b*tan(f*x + e)^2 + a)^(5/2), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\mathrm {tan}\left (e+f\,x\right )}^4}{{\left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\right )}^{5/2}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(e + f*x)^4/(a + b*tan(e + f*x)^2)^(5/2),x)

[Out]

int(tan(e + f*x)^4/(a + b*tan(e + f*x)^2)^(5/2), x)

________________________________________________________________________________________